﻿using McsWeb.Common;
using McsWeb.Models.ZBModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace McsWeb.API.ZBAPI
{
    public class MarketsAPI
    {
        private static string baseURL = "http://api.bitkk.com/";

        /// <summary>
        /// 行情
        /// 参数：币种
        /// </summary>
        public static Ticker GetTicker(string market)
        {
            try
            {
                string url = baseURL + "data/v1/ticker";
                Ticker res = WebApiHelper.Get<Ticker>(url, "market=" + market);
                return res;
            }
            catch (Exception ex)
            {
                Console.WriteLine("中币 " + ex.Message);
                return null;
            }
        }
    }
}